package com.fengyi.homefurnish.service.impl;

import com.fengyi.homefurnish.mapper.ProAttrValueMapper;
import com.fengyi.homefurnish.pojo.ProAttrValue;
import com.fengyi.homefurnish.service.ProAttrValueService;
import com.fengyi.homefurnish.utils.Pager;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Service
@Transactional
public class ProAttrValueServiceImpl implements ProAttrValueService {

    @Resource
    private ProAttrValueMapper proAttrValueMapper;

    @Override
    public Pager<ProAttrValue> getProAttrNamePager(Integer offset, Integer limit, ProAttrValue proAttrValue) {
        Pager<ProAttrValue> pager = new Pager<>();
        pager.setRows(proAttrValueMapper.getProAttrValRows(offset,limit,proAttrValue));
        pager.setTotal(proAttrValueMapper.getProAttrValTotal(proAttrValue));
        return pager;
    }
}
